package com.xoa.service.hr;

import com.xoa.model.hr.*;
import com.xoa.util.ToJson;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 离职模块服务接口类
 */
@Service
public interface HrStaffLeaveService {

    //根据部门id查询离职人员信息
    public ToJson<HrStaffInfo> querytLeavePersonByDeptId(HttpServletRequest request, Integer deptId);
    //根据部门Id查询离职人员名
    public  ToJson<HrStaffLeave> getLeaveUsersByDeptId(HttpServletRequest request,Integer  deptId);
    //新建离职信息
    public ToJson<HrStaffLeave> addLeaveInfor(HrStaffLeave hrStaffLeave,HttpServletRequest request);
    //左侧部门树根据deptid查询人员
    public ToJson<HrStaffLeave> getLeaveUserByDeptId(HttpServletRequest request,Integer deptId);
    //根据leaveId删除离职人员信息
    public ToJson<HrStaffLeave> deleteLeaveInfoByLeaveId(Integer[] leaveId);
    //修改离职人员信息
    public ToJson<HrStaffLeave> updateByPrimaryKeySelective(HrStaffLeave hrStaffLeave,HttpServletRequest request);
    //复职
    public ToJson<HrStaffLeave> leaveReinstatement(HttpServletRequest request,HrStaffLeave hrStaffLeave,HrStaffReinstatementWithBLOBs reinstatementWithBLOBs);
    //根据leaveId查询详细信息
    public ToJson<HrStaffLeave> leaveDetails(Integer leaveId,HttpServletRequest request);
    //查询黑名单，需要一定的权限
    public ToJson<HrStaffLeave> leaveBlackList(HttpServletRequest request);
    //查询本月离职人员信息
    public ToJson<HrStaffLeave> leaveThisMonth();
    //条件查询
    public ToJson<HrStaffLeave> leaveConditionQuery(String leavePerson,String quitType,String deptId,String quitTimePlanStart,String quitTimePlanEnd,String quitTimeFactStart,String quitTimeFactEnd,String quitReason,String despacho,Boolean useFlag,Integer pageSize,Integer page);
    //列表查询
    public ToJson<HrStaffLeave> leaveQuery(Boolean useFlag,Integer pageSize,Integer page,String leavePerson);
    //导入离职人员信息
    public ToJson<HrStaffLeave> importLeaveInfo(MultipartFile file,HttpServletRequest request);
    //导出离职人员信息
    public ToJson<HrStaffLeave> exportLeaveInfo(String leavePerson,String quitType,String deptId,String quitTimePlanStart,String quitTimePlanEnd,String quitTimeFactStart,String quitTimeFactEnd,String quitReason,String despacho,Boolean useFlag,Integer pageSize,Integer page, HttpServletResponse response, HttpServletRequest request);

	public ToJson<HrStaffLeave> selectNumByCon(HrStaffLeave record,Integer[] deptId);

	public ToJson<HrStaffLeave> getByStaffName(String staffName, Integer page, Integer pageSize, boolean useFlag);
}
